package cn.coco.jf.fw.admin.sys.dao.user;

import cn.coco.jf.fw.admin.config.consts.SysConsts;
import cn.coco.jf.fw.admin.sys.model.user.UserModel;

import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.SqlPara;

public class UserDao {
    public static Page<UserModel> page(int pageNumer, int pageSize, String userCode, String userName){
        Kv kv = Kv.by("userCode", userCode)
                .set("userName", userName)
                .set("delFlg", SysConsts.DEL_FLG_NORMAL);
    	SqlPara sqlPara = UserModel.dao.getSqlPara("cn.coco.jf.sys.sql.user.page", kv);
    	return UserModel.dao.paginate(pageNumer, pageSize, sqlPara);
    }

}
